{extend name="layout"}
{block name="body"}
    <section class="wld-content">
        <div class="page_title">减员信息表</div>
        
        <div class="con_box layui-form">
            <div class="topTips">反馈信息：{$downsizing.feedback|default=""}</div>
            <form class="layui-form-type layui-form mainForm" data-auto="true" data-callback="submitCallback">
                <div class="con_title">
                    <span class="con_title_line"></span>
                    <span>员工信息</span>
                </div>
                <div class="add-input layui-form-item">
                	
                    <div class="layui-row ">
                    	<div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">服务编号</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"   disabled autocomplete="off"
                                           value="{$downsizing.code|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">姓&ensp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"   disabled autocomplete="off" value="{$increase.name|default=""}" class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">身份证号</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"    disabled autocomplete="off"
                                           value="{$increase.id_number|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">手机号码</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"  disabled autocomplete="off"
                                           value="{$increase.mobile|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                       
                        
                    </div>
                </div>
                <div class="con_title">
                    <span class="con_title_line"></span>
                    <span>确认信息</span>
                </div>
                <div class="add-input layui-form-item">
                    <div class="layui-row ">
                    	<div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">保险类型</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"  disabled autocomplete="off"
                                           value="{$insurances[$downsizing.insurance]}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                       
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">截止日期</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input data-date-input="" name="end_date" value="{$downsizing.end_date|default=""}" required
                                    placeholder="请选择截止日期" readonly
                                    class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">所属账期</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
<!--                                    <input data-date-input="month" name="account_period" value="{$downsizing.account_period ? $downsizing.account_period|default="" : $nextmonth}" required-->
<!--                                    placeholder="请选择所属账期"  -->
<!--                                    class="layui-input" autocomplete="off">-->
                                    <input  name="account_period" value="{$downsizing.account_period ? $downsizing.account_period|default="" : $nextmonth}" required readonly
                                    class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                  
                    </div>
                </div>
                <div class="add-obj">
                	<input type='hidden' value='{$downsizing.id}' name='id'>
                    <a class="add-back" onclick="window.history.back()">返回</a>
                    <a class="add-updata" onclick="$('form').submit()">提交</a>
                </div>
            </form>
			

		</div>
    </section>
{/block}
{block name="style"}
    <style>
        .layui-table tbody tr:hover{
            background-color: #fff;
        }
        .layui-table tbody tr td:nth-child(3) input{
            width: 648px;
        }
        .layui-input-inline  input[name='end_date']{
            border: 1px solid #e5e5e5;
            background: #fff;
            color: #9c9cae;
            cursor: auto;
        }
        .layui-input-inline  input[name='end_date']:focus {
            border: 1px solid #61cad7 !important;
        }
    </style>
{/block}
{block name="script"}
<script>
    //限制截止日期为上月及以后
    var endDate = laydate.render({
        elem: 'input[name="end_date"]',
        format: 'yyyy-MM-dd',
        type:'date',
        min:getFirstOfLastMonth(),
        done: function (value) {
            $('[name="account_period"]').val(getSelectNextMonth(value));
            $(this.elem).val(value).trigger('change');
        }
    });
    $("[name='end_date']").change(function(){
        // $("[name^='insurance_end_date']").val($(this).val())

        var  val=$(this).val();
        $("[name^='insurance_end_date']").each(function(){
            var dataType=$(this).attr("data-type");
            $(this).val(val)
            
           
          
        })
        form.render();
    })
</script>

{/block}



